import loading from "./index.vue";
export default {
  install (Vue) {
    const LoadingConstructor = Vue.extend(loading)
    
    // 4. 将组件挂载到页面元素上
    Vue.prototype.openWithPanel = function () {
      const instance =  new LoadingConstructor()
      const oDiv = document.createElement('div')
      oDiv.setAttribute('class' , 'hash-panel-loading')
      document.body.appendChild(oDiv)
      console.log('on' , instance);
      instance.$mount(oDiv)
    }
    Vue.prototype.hideWithPanel = function () {
      const dom = document.querySelector('.Loadong-wapper')
      console.log('dom' , dom);
      if(!dom) return
      dom.remove()
    }
  },

}